package com.example.cursor_orm.model;

import java.time.LocalDateTime;

/**
 * 用户操作日志模型类
 * 对应数据库表: user_log
 */
public class UserLog {
    private Integer id;
    private Integer userId;
    private String action;
    private String ipAddress;
    private LocalDateTime logTime;

    // 构造函数
    public UserLog() {}

    public UserLog(Integer userId, String action, String ipAddress) {
        this.userId = userId;
        this.action = action;
        this.ipAddress = ipAddress;
    }

    // Getter和Setter方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public LocalDateTime getLogTime() {
        return logTime;
    }

    public void setLogTime(LocalDateTime logTime) {
        this.logTime = logTime;
    }

    @Override
    public String toString() {
        return "UserLog{" +
          "id=" + id +
          ", userId=" + userId +
           ",action='" + action + '\'' +
              ", ipAddress='" + ipAddress + '\'' +
               ", logTime=" + logTime +
          '}';
    }
} 